package generate;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import com.e885.log.E885Logger;

/**
 * 產生 URL 的編碼，目前知道空白，單引號，雙引號，逗號
 * 
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 * @company E885 Group
 * @copyright Copyright (c) 2001-2008
 */

public class EncodingURLGenerator
{
	private String[] strs =
		{ " ", "'", "\"", ","  };

	public EncodingURLGenerator() throws UnsupportedEncodingException
	{
		for( int i = 0 ; i < strs.length ; i++ )
			E885Logger.testLog.debug( strs[i] + ":" + URLEncoder.encode( strs[i], "UTf-8" ) );
	}

	/**
	 * @param args
	 */
	public static void main( String[] args )
	{
		try
		{
			new EncodingURLGenerator();
		}
		catch( UnsupportedEncodingException ex )
		{
			ex.printStackTrace();
		}
	}

}
